package com.yfq.springframework.context.event;

import com.yfq.springframework.context.ApplicationContext;
import com.yfq.springframework.context.ApplicationEvent;

/**
 * @author: yfq
 * @date: 2023/1/31 17:40
 * @description:
 */
public abstract class ApplicationContextEvent extends ApplicationEvent {

    public ApplicationContextEvent(ApplicationContext source) {
        super(source);
    }

    /**
     * Get the {@code ApplicationContext} that the event was raised for.
     */
    public final ApplicationContext getApplicationContext() {
        return (ApplicationContext) getSource();
    }
}
